<include file="Public/head" />
<style>
    .select_model{
        -moz-appearance: none;background: rgba(0, 0, 0, 0) url("{:get_style_cdnurl()}paimai/yunying/images/sanjiao.jpg") no-repeat scroll 115px 5px;
        border: 1px solid #d7d7d7;float: left;height: 26px;line-height: 26px;margin-right: 8px;text-indent: 2px;width: 136px;}
    .table .mcenter{vertical-align: middle;text-align: center;}
</style>
</head>
<include file="Public/common_header" />
<div class="mian">
    <include file="Public/sidebar" menu="zsgl.zscl"/>
    <div class="mianR">
        <div class="yuyue">
            <ul>
                <li onclick="get_list(0);" class="yuCurrent">待处理</li>
                <li onclick="get_list(5);">待检测</li>
                <li onclick="get_list(1);">已重拍</li>
                <li onclick="get_list(2);">已退车</li>
                <li onclick="get_list(3);">交易成功</li>
                <li onclick="get_list(4);">其他渠道成交</li>
            </ul>
        </div>
        <div class="yuList">
            <div class="yuSuo clearfix">
                <form id="searchFrom">
                    <input type="hidden" id="status" name="status" value=""/>
                    <select name="location_area" id="location_area" class="select_model">
                        <if condition="count($bc_city) gt 1">
                            <option value="0">请选择所在地</option>
                        </if>
                        <volist name="bc_city" id="city">
                            <option value="{$key}">{$city}</option>
                        </volist>
                    </select>
                    <select name="pay_status" id="pay_status" class="select_model">
                        <option value="0">请选择付款状态</option>
                        <option value="1">待付首款</option>
                        <option value="2">已付首款</option>
                    </select>
                    <select name="self_type" id="self_type" class="select_model">
                        <option value="0">请选择自收类型</option>
                        <option value="1">首次收购</option>
                        <option value="2">确认失败</option>
                        <option value="3">车商退车</option>
                    </select>
                    <input type="text" id="sno" name="sno" placeholder="车辆编号" value="" class="suoDian" />
                </form>
                <input type="button" onclick="search();" id="search" value="搜索" class="suoSou">
                <input type="button" onclick="window.location.href='/SelfReceiveCar/index'" value="全部" class="suoSou">
            </div>

            <div class="listBox" id="listBox">

            </div>
        </div>
        <div class="clear"></div>
    </div>
</div>
</body>
<script type="text/javascript">
    get_list(0);
    function get_list(t) {
        $("#searchFrom input").val("");
        $("#status").val(t);
        if(t == 0 ){
            $('#pay_status').show();
            $('#self_type').show();
        }else{
            $('#pay_status').hide();
            $('#self_type').hide();
        }
        if(t == 5){
            $('#pay_status').show();
            getWaitingCheckList();
        }else{
            $.get("/SelfReceiveCar/self_receive_car_list", {status:t}, function (data) {
                $("#listBox").html(data);
            }, "html");
        }
    }

    //得到待检测列表
    function getWaitingCheckList() {
        $.get("/SelfReceiveCar/waiting_check_list", {}, function (data) {
            $("#listBox").html(data);
        }, "html");
    }

    function get_page(p) {
        var data = $("#searchFrom").serialize() + "&" + encodeURI("p=" + p);
        $.get("/SelfReceiveCar/self_receive_car_list", data, function (data) {
            $("#listBox").html(data);
        }, "html");
    }

    function search() {
        var status = $("#status").val();
        if(status == 5){
            $.get("/SelfReceiveCar/waiting_check_list", $("#searchFrom").serialize(), function (data) {
                $("#listBox").html(data);
            }, "html");
        }else{
            $.get("/SelfReceiveCar/self_receive_car_list", $("#searchFrom").serialize(), function (data) {
                $("#listBox").html(data);
            }, "html");
        }
    }
</script>
</html>